#获取日期的完整格式字符串yyyy-MM-dd HH:mm:ss
exports.get_full_time = (date) ->
  year = date.getFullYear()
  month = date.getMonth() + 1
  day = date.getDate()
  hour = date.getHours()
  minute = date.getMinutes()
  second = date.getSeconds()
  full_time = year+'-'+month+'-'+day+' '+hour+':'+minute+':'+second
  return full_time

format_num = (num) ->
  if num<10
    num = '0'+num
  return num

exports.get_time_str = () ->
  date = new Date
  year = date.getFullYear()
  month = date.getMonth() + 1
  day = date.getDate()
  hour = date.getHours()
  minute = date.getMinutes()
  second = date.getSeconds()
  mill = date.getMilliseconds()
  full_time = year+format_num(month)+format_num(day)+'-'+format_num(hour)+format_num(minute)+format_num(second)+mill
  return full_time


